3.238 \(\int \frac{1}{1+\sin ^4(x)} \, dx\)

Optimal. Leaf size=309 \[ \frac{x}{2 \sqrt{\sqrt{2}-1}}-\frac{1}{8} \sqrt{\sqrt{2}-1} \log \left (2 \tan ^2(x)-2 \sqrt{\sqrt{2}-1} \tan (x)+\sqrt{2}\right )+\frac{1}{8} \sqrt{\sqrt{2}-1} \log \left (\sqrt{2} \tan ^2(x)+\sqrt{2 \left (\sqrt{2}-1\right )} \tan (x)+1\right )+\frac{\tan ^{-1}\left (\frac{-2 \sqrt{\sqrt{2}-1} \cos ^2(x)-\left (\sqrt{2}-2\right ) \sin (x) \cos (x)+\sqrt{\sqrt{2}-1}}{\left (\sqrt{2}-2\right ) \cos ^2(x)-2 \sqrt{\sqrt{2}-1} \sin (x) \cos (x)+\sqrt{1+\sqrt{2}}+2}\right )}{4 \sqrt{\sqrt{2}-1}}-\frac{\tan ^{-1}\left (\frac{-2 \sqrt{\sqrt{2}-1} \cos ^2(x)+\left (\sqrt{2}-2\right ) \sin (x) \cos (x)+\sqrt{\sqrt{2}-1}}{\left (\sqrt{2}-2\right ) \cos ^2(x)+2 \sqrt{\sqrt{2}-1} \sin (x) \cos (x)+\sqrt{1+\sqrt{2}}+2}\right )}{4 \sqrt{\sqrt{2}-1}} \]

[Out]

x/(2*Sqrt[-1 + Sqrt[2]]) + ArcTan[(Sqrt[-1 + Sqrt[2]] - 2*Sqrt[-1 + Sqrt[2]]*Cos[x]^2 - (-2 + Sqrt[2])*Cos[x]*
Sin[x])/(2 + Sqrt[1 + Sqrt[2]] + (-2 + Sqrt[2])*Cos[x]^2 - 2*Sqrt[-1 + Sqrt[2]]*Cos[x]*Sin[x])]/(4*Sqrt[-1 + S
qrt[2]]) - ArcTan[(Sqrt[-1 + Sqrt[2]] - 2*Sqrt[-1 + Sqrt[2]]*Cos[x]^2 + (-2 + Sqrt[2])*Cos[x]*Sin[x])/(2 + Sqr
t[1 + Sqrt[2]] + (-2 + Sqrt[2])*Cos[x]^2 + 2*Sqrt[-1 + Sqrt[2]]*Cos[x]*Sin[x])]/(4*Sqrt[-1 + Sqrt[2]]) - (Sqrt
[-1 + Sqrt[2]]*Log[Sqrt[2] - 2*Sqrt[-1 + Sqrt[2]]*Tan[x] + 2*Tan[x]^2])/8 + (Sqrt[-1 + Sqrt[2]]*Log[1 + Sqrt[2
*(-1 + Sqrt[2])]*Tan[x] + Sqrt[2]*Tan[x]^2])/8

________________________________________________________________________________________

Rubi [A]  time = 0.202052, antiderivative size = 309, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.75, Rules used = {3209, 1169, 634, 618, 204, 628} \[ \frac{x}{2 \sqrt{\sqrt{2}-1}}-\frac{1}{8} \sqrt{\sqrt{2}-1} \log \left (2 \tan ^2(x)-2 \sqrt{\sqrt{2}-1} \tan (x)+\sqrt{2}\right )+\frac{1}{8} \sqrt{\sqrt{2}-1} \log \left (\sqrt{2} \tan ^2(x)+\sqrt{2 \left (\sqrt{2}-1\right )} \tan (x)+1\right )+\frac{\tan ^{-1}\left (\frac{-2 \sqrt{\sqrt{2}-1} \cos ^2(x)-\left (\sqrt{2}-2\right ) \sin (x) \cos (x)+\sqrt{\sqrt{2}-1}}{\left (\sqrt{2}-2\right ) \cos ^2(x)-2 \sqrt{\sqrt{2}-1} \sin (x) \cos (x)+\sqrt{1+\sqrt{2}}+2}\right )}{4 \sqrt{\sqrt{2}-1}}-\frac{\tan ^{-1}\left (\frac{-2 \sqrt{\sqrt{2}-1} \cos ^2(x)+\left (\sqrt{2}-2\right ) \sin (x) \cos (x)+\sqrt{\sqrt{2}-1}}{\left (\sqrt{2}-2\right ) \cos ^2(x)+2 \sqrt{\sqrt{2}-1} \sin (x) \cos (x)+\sqrt{1+\sqrt{2}}+2}\right )}{4 \sqrt{\sqrt{2}-1}} \]

Antiderivative was successfully verified.

[In]

Int[(1 + Sin[x]^4)^(-1),x]

[Out]

x/(2*Sqrt[-1 + Sqrt[2]]) + ArcTan[(Sqrt[-1 + Sqrt[2]] - 2*Sqrt[-1 + Sqrt[2]]*Cos[x]^2 - (-2 + Sqrt[2])*Cos[x]*
Sin[x])/(2 + Sqrt[1 + Sqrt[2]] + (-2 + Sqrt[2])*Cos[x]^2 - 2*Sqrt[-1 + Sqrt[2]]*Cos[x]*Sin[x])]/(4*Sqrt[-1 + S
qrt[2]]) - ArcTan[(Sqrt[-1 + Sqrt[2]] - 2*Sqrt[-1 + Sqrt[2]]*Cos[x]^2 + (-2 + Sqrt[2])*Cos[x]*Sin[x])/(2 + Sqr
t[1 + Sqrt[2]] + (-2 + Sqrt[2])*Cos[x]^2 + 2*Sqrt[-1 + Sqrt[2]]*Cos[x]*Sin[x])]/(4*Sqrt[-1 + Sqrt[2]]) - (Sqrt
[-1 + Sqrt[2]]*Log[Sqrt[2] - 2*Sqrt[-1 + Sqrt[2]]*Tan[x] + 2*Tan[x]^2])/8 + (Sqrt[-1 + Sqrt[2]]*Log[1 + Sqrt[2
*(-1 + Sqrt[2])]*Tan[x] + Sqrt[2]*Tan[x]^2])/8

Rule 3209

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^4)^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dis
t[ff/f, Subst[Int[(a + 2*a*ff^2*x^2 + (a + b)*ff^4*x^4)^p/(1 + ff^2*x^2)^(2*p + 1), x], x, Tan[e + f*x]/ff], x
]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[p]

Rule 1169

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r =
Rt[2*q - b/c, 2]}, Dist[1/(2*c*q*r), Int[(d*r - (d - e*q)*x)/(q - r*x + x^2), x], x] + Dist[1/(2*c*q*r), Int[(
d*r + (d - e*q)*x)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2
- b*d*e + a*e^2, 0] && NegQ[b^2 - 4*a*c]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{1}{1+\sin ^4(x)} \, dx &=\operatorname{Subst}\left (\int \frac{1+x^2}{1+2 x^2+2 x^4} \, dx,x,\tan (x)\right )\\ &=\frac{\operatorname{Subst}\left (\int \frac{\sqrt{-1+\sqrt{2}}-\left (1-\frac{1}{\sqrt{2}}\right ) x}{\frac{1}{\sqrt{2}}-\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\tan (x)\right )}{2 \sqrt{2 \left (-1+\sqrt{2}\right )}}+\frac{\operatorname{Subst}\left (\int \frac{\sqrt{-1+\sqrt{2}}+\left (1-\frac{1}{\sqrt{2}}\right ) x}{\frac{1}{\sqrt{2}}+\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\tan (x)\right )}{2 \sqrt{2 \left (-1+\sqrt{2}\right )}}\\ &=-\left (\frac{1}{8} \sqrt{-1+\sqrt{2}} \operatorname{Subst}\left (\int \frac{-\sqrt{-1+\sqrt{2}}+2 x}{\frac{1}{\sqrt{2}}-\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\tan (x)\right )\right )+\frac{1}{8} \sqrt{-1+\sqrt{2}} \operatorname{Subst}\left (\int \frac{\sqrt{-1+\sqrt{2}}+2 x}{\frac{1}{\sqrt{2}}+\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\tan (x)\right )+\frac{1}{8} \sqrt{3+2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{\frac{1}{\sqrt{2}}-\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\tan (x)\right )+\frac{1}{8} \sqrt{3+2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{\frac{1}{\sqrt{2}}+\sqrt{-1+\sqrt{2}} x+x^2} \, dx,x,\tan (x)\right )\\ &=-\frac{1}{8} \sqrt{-1+\sqrt{2}} \log \left (\sqrt{2}-2 \sqrt{-1+\sqrt{2}} \tan (x)+2 \tan ^2(x)\right )+\frac{1}{8} \sqrt{-1+\sqrt{2}} \log \left (1+\sqrt{2 \left (-1+\sqrt{2}\right )} \tan (x)+\sqrt{2} \tan ^2(x)\right )-\frac{1}{4} \sqrt{3+2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{-1-\sqrt{2}-x^2} \, dx,x,-\sqrt{-1+\sqrt{2}}+2 \tan (x)\right )-\frac{1}{4} \sqrt{3+2 \sqrt{2}} \operatorname{Subst}\left (\int \frac{1}{-1-\sqrt{2}-x^2} \, dx,x,\sqrt{-1+\sqrt{2}}+2 \tan (x)\right )\\ &=\frac{1}{2} \sqrt{1+\sqrt{2}} x+\frac{1}{4} \sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{\sqrt{-1+\sqrt{2}}-2 \sqrt{-1+\sqrt{2}} \cos ^2(x)+\left (2-\sqrt{2}\right ) \cos (x) \sin (x)}{2+\sqrt{1+\sqrt{2}}-\left (2-\sqrt{2}\right ) \cos ^2(x)-2 \sqrt{-1+\sqrt{2}} \cos (x) \sin (x)}\right )-\frac{1}{4} \sqrt{1+\sqrt{2}} \tan ^{-1}\left (\frac{\sqrt{-1+\sqrt{2}}-2 \sqrt{-1+\sqrt{2}} \cos ^2(x)-\left (2-\sqrt{2}\right ) \cos (x) \sin (x)}{2+\sqrt{1+\sqrt{2}}-\left (2-\sqrt{2}\right ) \cos ^2(x)+2 \sqrt{-1+\sqrt{2}} \cos (x) \sin (x)}\right )-\frac{1}{8} \sqrt{-1+\sqrt{2}} \log \left (\sqrt{2}-2 \sqrt{-1+\sqrt{2}} \tan (x)+2 \tan ^2(x)\right )+\frac{1}{8} \sqrt{-1+\sqrt{2}} \log \left (1+\sqrt{2 \left (-1+\sqrt{2}\right )} \tan (x)+\sqrt{2} \tan ^2(x)\right )\\ \end{align*}

Mathematica [C]  time = 0.0734058, size = 45, normalized size = 0.15 \[ \frac{\tan ^{-1}\left (\sqrt{1-i} \tan (x)\right )}{2 \sqrt{1-i}}+\frac{\tan ^{-1}\left (\sqrt{1+i} \tan (x)\right )}{2 \sqrt{1+i}} \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + Sin[x]^4)^(-1),x]

[Out]

ArcTan[Sqrt[1 - I]*Tan[x]]/(2*Sqrt[1 - I]) + ArcTan[Sqrt[1 + I]*Tan[x]]/(2*Sqrt[1 + I])

________________________________________________________________________________________

Maple [A]  time = 0.151, size = 239, normalized size = 0.8 \begin{align*}{\frac{\sqrt{2}\sqrt{-2+2\,\sqrt{2}}\ln \left ( \sqrt{2}+\sqrt{-2+2\,\sqrt{2}}\sqrt{2}\tan \left ( x \right ) +2\, \left ( \tan \left ( x \right ) \right ) ^{2} \right ) }{16}}+{\frac{\sqrt{2}}{4\,\sqrt{1+\sqrt{2}}}\arctan \left ({\frac{\sqrt{2}\sqrt{-2+2\,\sqrt{2}}+4\,\tan \left ( x \right ) }{2\,\sqrt{1+\sqrt{2}}}} \right ) }+{\frac{1}{4\,\sqrt{1+\sqrt{2}}}\arctan \left ({\frac{\sqrt{2}\sqrt{-2+2\,\sqrt{2}}+4\,\tan \left ( x \right ) }{2\,\sqrt{1+\sqrt{2}}}} \right ) }-{\frac{\sqrt{2}\sqrt{-2+2\,\sqrt{2}}\ln \left ( -\sqrt{-2+2\,\sqrt{2}}\sqrt{2}\tan \left ( x \right ) +2\, \left ( \tan \left ( x \right ) \right ) ^{2}+\sqrt{2} \right ) }{16}}+{\frac{\sqrt{2}}{4\,\sqrt{1+\sqrt{2}}}\arctan \left ({\frac{-\sqrt{2}\sqrt{-2+2\,\sqrt{2}}+4\,\tan \left ( x \right ) }{2\,\sqrt{1+\sqrt{2}}}} \right ) }+{\frac{1}{4\,\sqrt{1+\sqrt{2}}}\arctan \left ({\frac{-\sqrt{2}\sqrt{-2+2\,\sqrt{2}}+4\,\tan \left ( x \right ) }{2\,\sqrt{1+\sqrt{2}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1+sin(x)^4),x)

[Out]

1/16*2^(1/2)*(-2+2*2^(1/2))^(1/2)*ln(2^(1/2)+(-2+2*2^(1/2))^(1/2)*2^(1/2)*tan(x)+2*tan(x)^2)+1/4/(1+2^(1/2))^(
1/2)*arctan(1/2*(2^(1/2)*(-2+2*2^(1/2))^(1/2)+4*tan(x))/(1+2^(1/2))^(1/2))*2^(1/2)+1/4/(1+2^(1/2))^(1/2)*arcta
n(1/2*(2^(1/2)*(-2+2*2^(1/2))^(1/2)+4*tan(x))/(1+2^(1/2))^(1/2))-1/16*2^(1/2)*(-2+2*2^(1/2))^(1/2)*ln(-(-2+2*2
^(1/2))^(1/2)*2^(1/2)*tan(x)+2*tan(x)^2+2^(1/2))+1/4/(1+2^(1/2))^(1/2)*arctan(1/2*(-2^(1/2)*(-2+2*2^(1/2))^(1/
2)+4*tan(x))/(1+2^(1/2))^(1/2))*2^(1/2)+1/4/(1+2^(1/2))^(1/2)*arctan(1/2*(-2^(1/2)*(-2+2*2^(1/2))^(1/2)+4*tan(
x))/(1+2^(1/2))^(1/2))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sin \left (x\right )^{4} + 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+sin(x)^4),x, algorithm="maxima")

[Out]

integrate(1/(sin(x)^4 + 1), x)

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+sin(x)^4),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+sin(x)**4),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sin \left (x\right )^{4} + 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(1+sin(x)^4),x, algorithm="giac")

[Out]

integrate(1/(sin(x)^4 + 1), x)